package cn.sdormitory.smartdor.dao;

import cn.sdormitory.smartdor.entity.SdRepair;
import cn.sdormitory.smartdor.vo.DeviceVo;
import cn.sdormitory.smartdor.vo.RepairInfoVo;
import cn.sdormitory.smartdor.vo.RepairStaVo;
import cn.sdormitory.smartdor.vo.RepairVo;
import cn.sdormitory.smartdor.vo.SdRepairAppVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @创建人：zhouyang
 * @创建时间：2021/10/13 14:36
 * @version：V1.0
 */
@Mapper
public interface SdRepairDao extends BaseMapper<SdRepair> {
    List<RepairVo> findAppRepairByRepairUserId(Long userId);
    List<RepairVo> getAppRepair(@Param("repairDate") String repairDate, @Param("storey") String storey,@Param("buildingNo") String buildingNo);
    SdRepair getRepairInfoById(@Param("id") Long id);
    List<RepairVo> getAppRepairByBId(@Param("bdormitoryId") Long bdormitoryId,@Param("repairDate") String repairDate);
    List<DeviceVo> getAppDevice();
    RepairStaVo getAppRepairCount();
    List<RepairInfoVo> getAppNewRepairList();
    List<RepairInfoVo> getAppProcessList();
    List<RepairInfoVo> getAppHistoryRepList();
    List<RepairInfoVo> getAppHisRepListByBId(@Param("bdormitoryId")Long bdormitoryId);
    List<RepairInfoVo> getNewRepairInfoById(@Param("bdormitoryId")Long bdormitoryId);
    List<RepairInfoVo> getAllRepairByCreatedBy(@Param("username")String userName);

    /**
     * 查询宿舍报修数据列表
     * @param startDate
     * @param endDate
     * @param buildingNo
     * @param storey
     * @param dormitoryNo
     * @return
     */
    List<SdRepairAppVo> findList(@Param("startDate")String startDate,
                                 @Param("endDate")String endDate,
                                 @Param("buildingNo")String buildingNo,
                                 @Param("storey")String storey,
                                 @Param("dormitoryNo")String dormitoryNo);

}
